{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-06-28T05:19:59.314312Z",
     "start_time": "2025-06-28T05:19:58.981400Z"
    }
   },
   "source": "import pandas as pd",
   "outputs": [],
   "execution_count": 1
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:19:59.317253Z",
     "start_time": "2025-06-28T05:19:59.315328Z"
    }
   },
   "cell_type": "code",
   "source": "import numpy as np",
   "id": "df320d11eb249d5",
   "outputs": [],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:24:22.015996Z",
     "start_time": "2025-06-28T05:24:22.007893Z"
    }
   },
   "cell_type": "code",
   "source": [
    "df = pd.DataFrame(\n",
    "    {\n",
    "        \"Sample\": [f\"Sample{i}\" for i in np.arange(1, 21)],\n",
    "        \"Group\": [f\"Group{i}\" for i in [1,2,3,4,5] * 4],\n",
    "        \"Value\": np.random.uniform(10, 100, 20)\n",
    "    }\n",
    ")"
   ],
   "id": "cdd594e8ae843854",
   "outputs": [],
   "execution_count": 5
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:24:23.468125Z",
     "start_time": "2025-06-28T05:24:23.460892Z"
    }
   },
   "cell_type": "code",
   "source": "df",
   "id": "1b596e5687c04209",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "      Sample   Group      Value\n",
       "0    Sample1  Group1  76.323703\n",
       "1    Sample2  Group2  43.307806\n",
       "2    Sample3  Group3  28.651699\n",
       "3    Sample4  Group4  90.732997\n",
       "4    Sample5  Group5  87.001333\n",
       "5    Sample6  Group1  88.155036\n",
       "6    Sample7  Group2  96.554448\n",
       "7    Sample8  Group3  22.904354\n",
       "8    Sample9  Group4  12.044870\n",
       "9   Sample10  Group5  31.168822\n",
       "10  Sample11  Group1  97.750928\n",
       "11  Sample12  Group2  61.571673\n",
       "12  Sample13  Group3  88.806037\n",
       "13  Sample14  Group4  53.301991\n",
       "14  Sample15  Group5  25.586698\n",
       "15  Sample16  Group1  39.922139\n",
       "16  Sample17  Group2  44.772767\n",
       "17  Sample18  Group3  90.165924\n",
       "18  Sample19  Group4  22.053620\n",
       "19  Sample20  Group5  19.669304"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Sample</th>\n",
       "      <th>Group</th>\n",
       "      <th>Value</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Sample1</td>\n",
       "      <td>Group1</td>\n",
       "      <td>76.323703</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Sample2</td>\n",
       "      <td>Group2</td>\n",
       "      <td>43.307806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Sample3</td>\n",
       "      <td>Group3</td>\n",
       "      <td>28.651699</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Sample4</td>\n",
       "      <td>Group4</td>\n",
       "      <td>90.732997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Sample5</td>\n",
       "      <td>Group5</td>\n",
       "      <td>87.001333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Sample6</td>\n",
       "      <td>Group1</td>\n",
       "      <td>88.155036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Sample7</td>\n",
       "      <td>Group2</td>\n",
       "      <td>96.554448</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Sample8</td>\n",
       "      <td>Group3</td>\n",
       "      <td>22.904354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Sample9</td>\n",
       "      <td>Group4</td>\n",
       "      <td>12.044870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Sample10</td>\n",
       "      <td>Group5</td>\n",
       "      <td>31.168822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Sample11</td>\n",
       "      <td>Group1</td>\n",
       "      <td>97.750928</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Sample12</td>\n",
       "      <td>Group2</td>\n",
       "      <td>61.571673</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>Sample13</td>\n",
       "      <td>Group3</td>\n",
       "      <td>88.806037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>Sample14</td>\n",
       "      <td>Group4</td>\n",
       "      <td>53.301991</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>Sample15</td>\n",
       "      <td>Group5</td>\n",
       "      <td>25.586698</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>Sample16</td>\n",
       "      <td>Group1</td>\n",
       "      <td>39.922139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>Sample17</td>\n",
       "      <td>Group2</td>\n",
       "      <td>44.772767</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>Sample18</td>\n",
       "      <td>Group3</td>\n",
       "      <td>90.165924</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>Sample19</td>\n",
       "      <td>Group4</td>\n",
       "      <td>22.053620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>Sample20</td>\n",
       "      <td>Group5</td>\n",
       "      <td>19.669304</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:25:04.127577Z",
     "start_time": "2025-06-28T05:25:03.998387Z"
    }
   },
   "cell_type": "code",
   "source": "df.to_excel(\"example.xlsx\", header=True, index=False, engine=\"openpyxl\")",
   "id": "a607c51b13bf6d3d",
   "outputs": [],
   "execution_count": 7
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:25:37.554307Z",
     "start_time": "2025-06-28T05:25:37.542812Z"
    }
   },
   "cell_type": "code",
   "source": "df.to_csv(\"example.tsv\", header=True, index=False, sep=\"\\t\", encoding=\"utf-8\")",
   "id": "f6d7c463352d2b7f",
   "outputs": [],
   "execution_count": 8
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-06-28T05:25:52.081512Z",
     "start_time": "2025-06-28T05:25:52.077420Z"
    }
   },
   "cell_type": "code",
   "source": "df.to_csv(\"example.csv\", header=True, index=False, sep=\",\", encoding=\"utf-8\")",
   "id": "6db36fad4e806071",
   "outputs": [],
   "execution_count": 9
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "5c1bff3375cda69b"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
